<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文章</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../css/element.css">
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script src="../js/vue.js"></script>
    <script src="../js/element.js"></script>
    <script src="../js/axios.js"></script>
    <script src="../jss/requestjs.js"></script>
    <script src="../js/jquery-3.5.1.min.js"></script>
    <script src="../articlejs/wangEditor.min.js"></script>
    <script src="../articlejs/article.js"></script>
    <script src="../lib/layui/layui.js" charset="utf-8"></script>
    <script src="../js/xadmin.js"></script>
    <script src="../js/md5.js"></script>
    <script src="../js/common.js"></script>
</head>
<body>
<span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>导航元素</cite></a>
      </span>
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
    <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body" id="app">


   <el-table :data="articlearr" style="width: 100%" >
        <el-table-column prop="aid" label="文章id"  align="center" min-width="5%">
        </el-table-column>
        <el-table-column prop="name" label="发布用户"  align="center" min-width="5%">
        </el-table-column>
        <el-table-column prop="a_title" label="标题"  align="center" min-width="19%" :show-overflow-tooltip="true">
        </el-table-column>
       <el-table-column prop="read_count" label="阅读量" align="center" min-width="5%" >
       </el-table-column>
       <el-table-column prop="count" label="评论个数" align="center" min-width="5%">
       </el-table-column>
       <el-table-column prop="collect_count" label="收藏苏"  align="center" min-width="5%" >
       </el-table-column>
       <el-table-column prop="tid" label="类型" align="center" min-width="5%">
           <template slot-scope="scope">
               {{scope.row.tid | mytype }}
           </template>
       </el-table-column>
        <el-table-column prop="state" label="状态" align="center" min-width="5%">
            <template slot-scope="scope">
                {{scope.row.state | mystate }}
            </template>
        </el-table-column>
        <el-table-column prop="created_time" label="创建时间" align="center" min-width="15%">
            <template slot-scope="scope">
                {{scope.row.created_time | mytime }}
            </template>
        </el-table-column>
       <el-table-column prop="audit_time" label="发布时间" align="center" min-width="15%">
           <template slot-scope="scope">
               {{scope.row.audit_time | mytime }}
           </template>
       </el-table-column>
        <el-table-column label="操作" min-width="15%" align="center">
            <template slot-scope="scope">
                <el-button plain size="mini" round @click="wantlookallarticle(scope.row)">查看</el-button>
                <el-button type="primary" icon="el-icon-edit" circle @click="updateallarticlemetod(scope.row)" v-if="scope.row.state!=1"></el-button>
            </template>
        </el-table-column>
    </el-table>
    <div>
        <el-pagination background layout="prev, pager, next,sizes,total" :total="pagination.total" :page-size="pagination.pageSize"
                       :current-page="pagination.pageNum" @size-change="sizeChange" @current-change="findBlogPageList" >
        </el-pagination>
    </div>

    <el-dialog title="文章查看" :visible.sync="lookallarticle" width="70%" >
        <span slot="footer" class="dialog-footer">
        <el-form ref="form" :model="articleobj" label-width="80px">
             <el-form-item label="文章标题">
                <el-input v-model="articleobj.a_title" :disabled="true"></el-input>
             </el-form-item>
            <el-form-item label="发布人">
                <el-input v-model="articleobj.name" :disabled="true"></el-input>
             </el-form-item>
        </el-form>
            <div  id="editor" style="text-align:left">
            </div>
    <el-button @click="lookallarticle = false">取 消</el-button>
        </span>
    </el-dialog>


        <el-dialog title="文章修改" :visible.sync="updateallarticle" width="70%" >
            <span slot="footer" class="dialog-footer">
                <el-form ref="form" :model="articleobj" >
                     <el-form-item label="文章标题">
                        <el-input v-model="articleobj.a_title" label-width="120px" :disabled="true"></el-input>
                     </el-form-item>
                    <el-form-item label="类型">
                        <el-select v-model="articleobj.tid" placeholder="请选择牙齿区域">
                            <el-option v-for="item in toucharray" :key="item.tid" :label="item.name" :value="item.tid">
                            </el-option>
                        </el-select>
                    </el-form-item>
                      <el-form-item label="状态">
                        <el-radio-group v-model="articleobj.state">
                          <el-radio :label="0">上架</el-radio>
                            <el-radio :label="2">下架</el-radio>
                         </el-radio-group>
                     </el-form-item>
                </el-form>
                    <div  id="updateeditorarticle" style="text-align:left">

                    </div>

        <el-button @click="updateallarticle = false">取 消</el-button>
        <el-button type="primary" @click="confirmupdatearticle">修 改</el-button>
            </span>
        </el-dialog>



</div>



<script>var _hmt = _hmt || []; (function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();</script>

</body>
</html>